---
title: "Transition Timing Function"
description: "Utilities for controlling the easing of CSS transitions."
---

import plugin from 'tailwindcss/lib/plugins/transitionTimingFunction'
import { Variants } from '@/components/Variants'
import { Disabling } from '@/components/Disabling'

export const classes = { plugin }

## Usage

Use the `ease-{timing}` utilities to control an element's easing curve.

```html indigo
<template preview>
  <div class="flex justify-around items-center">
    <button class="transition duration-700 ease-in transform hover:scale-125 bg-indigo-600 text-white font-semibold py-3 px-6 rounded-md">
      Hover me
    </button>
    <button class="transition duration-700 ease-out transform hover:scale-125 bg-indigo-600 text-white font-semibold py-3 px-6 rounded-md">
      Hover me
    </button>
    <button class="transition duration-700 ease-in-out transform hover:scale-125 bg-indigo-600 text-white font-semibold py-3 px-6 rounded-md">
      Hover me
    </button>
  </div>
</template>

<button class="transition **ease-in** duration-700 ...">Hover me</button>
<button class="transition **ease-out** duration-700 ...">Hover me</button>
<button class="transition **ease-in-out** duration-700 ...">Hover me</button>
```

## Responsive

To control an element's transition-timing-function at a specific breakpoint, add a `{screen}:` prefix to any existing transition-timing-function utility. For example, use `md:ease-in-out` to apply the `ease-in-out` utility at only medium screen sizes and above.

For more information about Tailwind's responsive design features, check out the [Responsive Design](/docs/responsive-design) documentation.

## Customizing

### Timing values

By default, Tailwind provides four general purpose transition-timing-function utilities. You change, add, or remove these by customizing the `transitionTimingFunction` section of your Tailwind theme config.

```diff-js
  // tailwind.config.js
  module.exports = {
    theme: {
      extend: {
        transitionTimingFunction: {
+         'in-expo': 'cubic-bezier(0.95, 0.05, 0.795, 0.035)',
+         'out-expo': 'cubic-bezier(0.19, 1, 0.22, 1)',
        }
      }
    }
  }
```

Learn more about customizing the default theme in the [theme customization documentation](/docs/theme#customizing-the-default-theme).

### Variants

<Variants plugin="transitionTimingFunction" name="transition-timing-function" />

### Disabling

<Disabling plugin="transitionTimingFunction" name="transition-timing-function" />
